Welcome to PtGen's On-line Help PtGen, a Prototype Generator for Turbo Pascal programs, is a full featured program intended to help you to quickly produce programs, prototypes. A prototype is saved to disk in TP-unit source code format. PtGen can read such a file back for additional editting. H It's assumed that you are familiar with Turbo Pascal type helpscreens. You can learn about the Prototype Generator by following the build-in tutorials, by using this on-line Help system and by consulting the manual. 2 Choose any of the following for more information p Product features Machine requirements Contacting Nederware PtGen's hot-keys Mouse operation Product featurs Product features: build-in tutorials to become quickly acquainted with PtGen quickly making the most advanced menu structures, including complete helptext support creating of a statusbar comfortably creating of dialogboxes 3D TVTool support Machine requirements What you need: Borland or Turbo Pascal 7.0 Turbo Vision (included with TP 7.0) enough knowlegde of both the TVTool package if you want to use the 3D views Contact the author You can contact Berend de Boer from Nederware, the author of this program by using one of the following electronic addresses: Q fidonet: 2:281/527.23 email: berend@beard.nest.nl compuserve: 100120,3121 or by regular mail: P Nederware c/o Berend de Boer Burgerstaaat 22 5311 CX GAMEREN HOLLAND PtGen's hot-keys Operation of PtGen is consistent throughout the program. Alt-F5 Pop-up local position menu for positioning the current object Alt-F10 Pop-up local menu Ctrl-F7 Delete current object/item Ctrl-F8 Edit current object/item Ctrl-F9 Link other objects to current object Ins Insert an item Del Delete an item See also mouse operation Ptgen Mouse operation in PtGen Left button Click on background to pop up the local menu Right button Click on object to pop up a menu with actions you can apply to that object or item. Sometimes no menu exist and the right button click goes directly into the edit mode for this object. See also hot Ptgen TVTool The TVTool 2.0 package contains among others 3D widgets for Turbo Vision. J If you have TVTool you can use PtGen to design complete 3D dialog boxes. q The author of TVTool is Richard Hansen and he can be reached at compuserve as 70242,3367 or by regular mail at: 3 PO Box 18571 Saint Paul, MN 55118-0571 USA File (Alt-F) The File menu offers choices for opening and loading existing files, creating new files, saving files, and exiting PtGen. Edit (Alt-E) Edit a new or a loaded application. You may also press Edit (Ctrl-F8). App (Alt-A) Set application options like application name, language (dutch or english), if it uses help, etc. File Open (F3) Load a previously saved application. Q PtGen only accepts source code that conforms entirely to the source it creates. [ You can edit the source code, but be carefull not to introduce not-PtGen compatible code. File New creates a new application. You are prompted to specify characteristics of this new application. File Save (F2) The Save command saves the application to disk. If the file has no name, PtGen opens the Save File As dialog box so you can rename the file and save it in a different directory or on a different drive. File Exit (Alt-X) The Exit command exits PtGen, removes it from memory, and returns you to DOS. ` If you've modified a source file without saving it, PtGen prompts you to do so before exiting. Enter the name of the application. Omit the proceeding 'T' (convention of Turbo Pascal) as PtGen will add a T to every objectname when writing the source file. T The name you enter will become the name of the application object you will create. Default language When you choose the default language option (the default) you use DEFAULT.TVR and DEFAULT.TXT. Copy ENGLISH.TVR or DUTCH.TVR to DEFAULT.TVR when you create only or mostly english or dutch applications. In this manner you don't have to change this option everytime you create a new application. You can use the default language option to use a different language too. Create a DEFAULT.TVR and DEFAULT.TXT containing the strings and texts in the language you wish. English language Use the english language for this application. t The file ENGLISH.TVR will be used as the base file for STRINGS.TVR, the string resource file for this application. Dutch language Maak gebruik van de nederlandse taal voor deze applicatie. q De file DUTCH.TVR zal worden gebruikt als basis voor STRINGS.TVR, de string resource file voor deze applicatie. Settings Change dialog box settings like its name and title. Listviewer Place a dummy listviewer on this dialog box. The created code can be changed by pressing the code button in the listviewer edit dialog box. Spinbutton Place a spinbutton (one line radiobutton) on its owner. Radiobuttons Place a radiobutton view on its owner. Checkboxes Place a Checkboxes view on its owner. Memo Place a memo view on its owner. Label Label an already inserted view. After you have specified the labeled text, you should select the view to be labeled. e Select that view by clicking on it with the mouse button or using Tab/Shift-Tab and pressing Enter. Static text Place text on its owner. Button Create a button yourself. Buttons Place a button on the current dialog box. Choose between user defined and predefined as OK or Cancel. You are prompted to specify a string resource file (.TVR) and a identifier file (.PAS or .INC). ~ The strings from in the resource file should be saved as 'Strings'. The strings are copied into the current string resource. > The identifiers are copied into the current identifier file. T In this way you can quickly merge different string resources and identifier files. App configuration Specify configuration settings for the application you are creating. Code Change some parameters of the code that will be generated for this view as its pointer type and parameters. Range validator A range validator checks the input the user types and restricts it to longints only which should be between the specified Min and Max value. Inputline Access to various inputlines, as the standard TInputLine and the PtGen TXInputLine PtGen now supports the TbxXXXXLine inputlines. They are part of TVTool and you need TVTool to be able to compile the resulting program. Validator Add a validator to an already inserted inputline. You can choose between different validators. L Select a validator, next select the inputline which needs to be validated. Note that already existing validators are disposed. The Validator option is meant to change the validation of an inputline or to upgrade inputlines of previous versions of PtGen. Enter the name of the source helptext file for this application. Usually this will be something like MYHELP.TXT. K You should call TVHC to convert this file to the corresponding .HLP file. Specify size of the editorbuffer in paragraphs (1 paragraph = 16 bytes). D Usually a value of 2 000 will suffice (16 x 2 000 = 32 000 bytes). (System) menu (Alt-Spacebar) The System menu appears on the far left of the menu bar and is represented by the symbol. < When you pull down the menu, you see the system command: About About ProtoType Generator When you choose the About command from the (System) menu, a dialog box appears, showing copyright and version information. 8 Press Esc, click OK, or click Cancel to close the box. File Save As... Give a new name to the source file for the current application. Before writing, PtGen checks if a file with such a name exist. If so, you're prompted if you want to overwrite it. When you choose Yes, the previous file is saved with the .BAK extension. If you choose No, you're prompted for another filename. Tutorial (Alt-T) PtGen contains three online tutorials: H Creating menubars Creating statuslines Creating dialogboxes They quickly and conveniently learn you to work with PtGen. Choose the Introduction first to learn the basics of working with PtGen. Tutorial Introduction Introduction to working with PtGen for mouse and keyboard users. You learn about PtGen's mouse buttons and about its hotkeys. 0 You are introduced to some basic concepts too. Tutorial Statusline Learn conveniently to create statuslines in PtGen. This tutorial is the same as found in the manual except that the manual contains a bit more explanation and discusses some more advanced concepts. Tutorial MenuBar Learn conveniently to create menubars in PtGen. This tutorial is the same as found in the manual except that the manual contains a bit more explanation and discusses some more advanced concepts. Tutorial Dialogbox Learn conveniently to create dialogboxes in PtGen. This tutorial is the same as found in the manual except that the manual contains a bit more explanation and discusses some more advanced Total number of columns for this TListViewer object. Reporter Not included in this version of PtGen. Schema creation Create a semantic abstraction hierarchie. Not included with this version of PtGen. Helptext Add, edit or delete helptexts. You can change the statusline hints as well as the helpwindow text. G You can also use it to change the constant values of the hcConstants. Objects Display all the objects which are created for this application. You can add, edit or delete objects. Statusline Edit the statusline. Validator error text Specify the resource string identifier which contains the custom warning string for this validator. Specify only an identifier if you want to override the default. If you want to change the default message itself, change ENGLISH.TVR (or any of the other string resource files like DUTCH.TVR). Dialog settings Change dialog settings like its name and title. You can specify the help text too which should appear when the Help button (if inserted) is pressed. Button In this dialog box you can define the characteristics of a button. * All button flags (bfXXXX) are supported. Lefthand Specify the local variable the view is assigned to. Before the view is inserted into its owner it is first assigned to a variable. You can use this variable to acces the view later on. Parameters Specify the parameters for this view. For some views you can only specify the extra parameters. The fixed parameters are not visible. h A fixed parameter is for example the Bounds of a view. This is always needed so you can't change that. Pointer name The object type that should be allocated. For example for an inputline you can specify PRealInputLine PtGen will in that case not write code to insert an inputline into its owner but to insert a RealInputLine. PtGen will write something like: " New(PRealInputLine, Init(..)); Helptext Enter the helptext which should be displayed as hint on the statusline when this item is selected. Help window The help window object is meant for linking a help window to a command. @ After the command is executed, a defined help window pops up. 2 The help windows are the standard help windows. You can insert, edit or delete objects. * * Insert an object by pressing Ins or by clicking on the New button. * Edit an object by selecting it and pressing - Ctrl-F8 or by clicking on the Edit button. * Delete on object by selecting it and 5 pressing Ctrl-F7 or by clicking on the Del button. You can insert, edit or delete statusline items. - * To insert, press Ins or click on the New button * To edit, select the item and press Edit ( (Ctrl-F8) or click on the Edit button * To delete, select the item and press Del or click on the Del button Insert an item. Delete an item. Enter the text which will be displayed on the statusline. Enter the keycode to generate the command which you will enter below. Valid keycodes are kbF1, kbF2, kbAltA etc. Command to generate when keycode is pressed. Enter the text to display for this item. Surround the hotkey with tildes (~). Command to generate when this item is selected. This command will be listed in the interface section of the unit you create so you can use it in your programs. F TIP: if you want this menuitem to behave as a DosShell just type in: cmDosShell, add some helptexts (if you want) and press Enter. Enter the helptext which should be displayed on the statusline when this item is selected. hcXXXX Enter the name which will be used to refer to this particular statusline helptext and helptext window. This is useful for crossreferencing. When no hcConstant is specified a default one is created. The default one consists of a 'H' + the value of the helpcontext. For example: H2022 or H2072. You can modify the stringslist by clicking on the New/Edit/Del buttons or by pressing Ins, Edit (Ctrl-F8) or Del. Enter the static text you want to display. You may enter the ^C and ^M directives by typing first a '^' than a 'C' or 'M'. 9 ^C will center the text ^M will go to the next line Characters lower than ascii 32 are not supported. Enter the text for the label. Characters surrounded by tildes (~) are highlighted. Enter the text to display on the button. You can use tildes (~) to highlight certain characters. Command to generate when button is selected. command will be listed in the interface section of the unit you create so you can use it in your programs. Code dialog box This dialog box lets you change the code that will be generated for the selected subview. Menuitem dialog box Edit this menuitem by filling in the various fields. 7 Notes: * Leave all fields empty if you want a divider line. * Leave the Command and Param fields empty if you want to create a submenu Unitnames Insert, edit or delete units by pressing Ins, Edit (Ctrl-F8) or Del respectively. # Or press the appropriate buttons. Units dialog box You can insert, edit or delete the units that will appear as the last units in the implementation uses clause in the created unit. In this manner you can `import' your views into the created code. Press the code button when you create a view (for example an inputline) to change the generated code. Units Specify units to be included in the implementation clause of the to be created unit. q If you make use of the user generated code you usually need to include units of your own which define the view. STRINGS.TVR The file STRINGS.TVR contains all strings for this application including the statusline hints. Q Using string resources internationalizing your application becomes much easier. ; Use the BBStRRes unit for easy acces to string resources. Cluster Dialog box Enter Cluster item string including its hint and a helptext to be shown when Help (F1) is pressed. HelpItems Insert, edit or delete helpitems. q You can change the identifier (hcConstant), the value of the hcConstant, the helptext and the help window text. Calculator Use the calculator object with your application. This is the same calculator as found in CALC.PAS which came with your Borland package. 3 It should be somewhere in the examples directory. Center Y Center X Make First Make this view the first view (lowest in Z-order) of this dialog box. Specify next view Specify the view that should be come next after this view. Use this option to specify the Tab/ Shift-Tab path through your dialog box. 5 That view becomes higher in Z-order than this view. Enter the name of the dialog box while omitting the usually preceding 'T'. PtGen adds a 'T' when writing the source file. J This name will be exported in the interface section of the created unit. Enter the title which will appear at the top of the dialog box. All characters, up to 30, should be supported. Strings (Alt-S) Edit the string resources for this application. This string resource editor for Turbo Vision is very much like the Windows resource editor. E Strings are saved in .TVR files, identifiers in .PAS or .INC files. String resource files dialog box This is the string resource files main dialog. You can add string resource files, delete or edit them. g When your application is saved, one big string resource file is created with the name 'STRINGS.TRV'. String resources file list This is the main list of all the string resource files this application uses. z You can add, delete or edit files by pressing Ins, Del or Edit (Ctrl-F8) or by clicking on the New, Del or Edit buttons. [ New ] A file dialog box will pop up to help selecting a string resource file and a identifier file. [ Edit ] After choosing edit, the selected string resource file can be editted. < Strings with identifiers can be added, edited, or deleted. [ Delete ] The selected string resource file is deleted from the files list. The copy on your disk is not deleted. Resource strings You can add, change or delete strings in this string resource file. This file will be included in the main string resource file (STRINGS.TVR) for this application. Edit a resource string You can add, edit or delete strings by pressing Ins, Edit (Ctrl-F8) or Del respectively or by clicking on the New, Edit or Delete buttons after you have selected an item. d For each item you can specify the name of the constant, the value of that constant and the string. H NOTE: The value of the constant should be unique for this application. Insert a string. You have to specify constant name, value and the string itself. Edit a string. You can change the name of the constant, its value and the string itself. Delete the selected string. Resource String You can edit the name of the constant of this string, the value of the constant and the string itself. Resource Constant Name Specify the constant name. This name will be put into the include file 'STRINGS.INC'. This file is created when you save your application. t For example, when you specify as name sOutOfMemory and as a value for this constant 100, the output will be: const sOutofMemory = 100; To discriminate between other constants and string recource constants the 's' prefix is suggested. Resource Constant Value Specify the constant value. This value will be put into the include file 'STRINGS.INC'. This file is created when you save your application. t For example, when you specify as name sOutOfMemory and as a value for this constant 100, the output will be: const sOutofMemory = 100; NOTE: Don't use values within the PtGen value range (1000..3999). All texts are stored in one string resource file so each string should be assigned a unique identifier. Resource string Specify the resource string itself. You can embed %d, %s or other format specifiers. / A maximum of 255 characters can be specified. Changes Pop up a window containing changes.doc, a document which describes all changes/new things for this release. TInputLine The TInputLine view is the normal TurboVision view. Full validator support is provided. Objects dialog box The objects dialog box shows all objects defined for this application. You can edit, delete or insert new objects. Picture validator Real validator A real validator checks if the entered string corresponds to the TurboPascal real type. Let the validator do the DataSize, GetData and SetData methods. TbxByteEdit dialog box Procedure call Enter the name of a procedure to call. Parameters may be included between the familiar parens. Examples: ( foo foo(a, b) foo('Hello world.') Leave the semicolon out. File menu Insert the standard File menu using the StdFileMenuItems call at the current menu level. Procedure call Link a procedure to this object. After you have choosen this object, you are asked to specify a procedure name. Compile help file All help texts are compiled to a .hlp file. Compilation stops after the first error. Dialog|Open Read a previous saved single dialog. Dialog|Create Create a single dialog without creating a whole application. You don't have to choose File|New but can directly execute Dialog|New Dialog (Alt-D) Acces to dialog only functions. No application is created. . Only a single dialog source file is created. In this operation mode, PtGen resembles DlgDsn in the way that only dialogs can be created and written. However, you retain the full editing power of PtGen. Use a function of a DLL in your application. In the protected mode version of PtGen you can directly acces this function. The real mode version can write the code to access a DLL only. Popup menu Create a complete popup including full helptext and statusline hint support. Status item dialog box Identifier Fill in a record identifier. Initially this record identifier is equal to the label of this view. This identifier is written in the record structure for this dialog box which can subsequently be used by GetData and SetData. Record identifier type Enter the record identifier type. Most of the time this type is automatically provided by the view itself, but you can override this. Center X Center this view horizontally within its owner's boundaries. Center Y Center this view vertically within its owner's boundaries. Create a record Create a record for this dialog box for use with GetData and SetData. $ The created record is of the form: e Rec = record : ; : ; ... end; The subviews know their types. If you have labeled the subviews their identifier will be equal to their label. You can override this default settings though. 3D dialog box Create a three dimensional dialog box with three dimensional subviews. You need TVTool 2.0 to compile such programs. ValidChars Enter the set of all characters the user can type. For example to allow only numeric digits, type '0'..'9' To allow only uppercase characters type 'A'..'Z' Clone Create an almost identical copy of the current selected object. Picture Enter the format for the type of string the user has to enter. A picture may consist of the following characters: (note that / stands for a curlet brace) - Type of character Character Description Special # Accept only a digit ? Accept only a letter (case-insensitive) & Accept only a letter, force to uppercase @ Accept any character ! Accept any character, force to uppercase Match ; Take next character literally * Repetition count A number after the '*' specifies how many the next character should be repeted [] Option // Grouping operators , Set of alternatives All others Taken literally Examples (from the TVTool package): % - unsigned int with optional commas #[#][#]*/[;,]###/ - dollars, with comma and optinal dollar sign [$]*#./##,00/ - phone number with optional area code [(###) ]###-#### - filename (no path) with extension /&*7[&]/./*3[&]/ None Don't use a validator. Filter validator Add the TFilterValidator to this inputline. Range validator Add a range validator to this inputline. Real validator Add a real validator to this inputline to let the user input a TurboPascal real type. b The real validator is identical to the RangeValidator except that a real range can be specified. Picture validator Add the TPXPictureValidator to this inputline. TXinputLine The TXInputLine is defined in BBDLG.PAS, a unit that came with your PtGen package. P TXInputLine supports the word left and right (Ctrl-Left and Ctrl-Right) keys. Cut & Paste is also possible. voFill Fill in literal characters as the user types. Validate on append Set if you want to validate on append only. This option is there to save your users from some unexpected, although logical, behaviour. m An example might clarify this. Let your picture be $##.##. Let this option be on. If your user has entered $23. he can place the cursor on '2' and enter a 'a' so the input becomes $2a3. This is valid because you specified that the input should be checked on append only. If you have turned this option off, this could not happen. But, assuming the original input, if the user places his cursor on the '2' and wants to delete it, that will not be possible, because the then existing string violates the picture. The user can only delete characters in this case when he starts deleting them at the end of the input using backspace. Your choice. TbxEditLine The TbxEditLine is part of TVTool. You need TVTool to compile the unit that PtGen will write. InputLine Dialog Box MaxLen Specify the maximum number of characters one can type in this inputline. EditLine Dialog Box EditLine Dialog Box. Minimum allowed value for this real. Maximum value allowed for this real. TbxByteEdit Insert TVTool's TbxByteEdit inputline. TbxIntegerEdit Insert TVTool's TbxIntegerEdit inputline. dfRequired Field entry is required. dfRJustify Trim and right justify result. dfLJustify Trim and left justify result. dfTrim Remove leading and trailing spaces from result. Hide Typed characters are not visible on the screen, instead the HideChar (default '*') character is written of any typed character. dfDefaults Use default values if available. Currently (TVTools 2.00) only applicable for use with the TbxDateEdit inputline to set a specified day, month or year to the current day, month or year (if SetDateDefaults has been called). Mask Specify the mask to use for this inputline. the mask characters are: V X any character U any character, force to uppercase L any character, force to lowercase a alpha numeric character only u alpha numerIc character only, force to uppercase l alpha numeric character only, force to lowercase # numbers, minus, period 9 digit only & hexadecimal numbers @ dates Examples: Date: 99/99/9999 Phone number: (999) 999-9999 [9999] Money: $#####.## Hexadecimal: &&&& TbxIntegerEdit dialog box The minimum should be between -32768 and 32767. The maximum allowed value should be between -32768 and 32767. TbxDateEdit dialog box Date picture In the date picture teh characters 'y', 'Y', 'm', 'M', 'd' and 'D' are used to specify the positions of the year, month and day in the input string. p Tne only editable characters in the input line will be in the positions indicated by these special characters. Examples: $ MM/DD/YY mm/dd/yyyy dd/mm/yy If dfDefault is set, missing data will be filled in using DefaultYear, DefaultMonth and DefaultDay (set these using SetDateDefaults). TbxDateEdit TbxDateEdit implements an input line for formatted dates. ? You need the TVTool package to compile the resulting program. StatusDef Insert, edit or delete a status definition. StatusDef dialog box Selectable Set if view should be selectabe. ofValidate Set if the view should validate itself before giving up its focus. 1 A view can retain the focus if it is not valid. ofFramed Set this option if you want the view to be framed. TextViewer After selecting this menu item, you are promted for a file name. & This file will be shown in a window. HistoryID Type the history ID number to use for this inputline. Help Enable this option if you want to use helptexts in your application. Enabling this option will cause PtGen to put the Help directive in DEFINES.DEF which will cause the help code in PREAPP.PAS to be compiled. Editor Enable if you want to use the Editors unit in your application. Bufferend Printer Not supplied with this release. 3D Turbo Vision Enable to support the TVTool package of Richard Hansen. TVTool lets you create Three Dimensional dialog boxes. HeapViewer If this option is enabled the HeapViewer from the Gadgets unit (/bp/examples/dos/tvdemo) is included in the source of this program. Clock If this option is enabled the Clok from the Gadgets unit (/bp/examples/dos/tvdemo) is included in the source of this program. Window menu Insert the standard Window menu using the StdWindowMenuItems call at the current menu level. Edit menu Insert the standard Edit menu using the StdEditMenuItems call at the current menu level. Sort menuview Sort the currently selected menuview (either the horizontal menubar or a vertical list of menu items). e Use this option when menu items cannot be logically grouped. An alphabetical sorting is best than. Menu name Change the name of this menubar or popup. Menubar Create a new menubar object, use for example when you want multiple menubars. v Tip: if you want different 'versions' of the same main menubar, just clone the main menubar and change the new copy. Which help window dialog Enter the information where the to be shown help window can be found. Help filename Enter the help file to use. If you leave this one empty the application help file will be used. g The application help file is the one you have specified in the Application configuration dialog box. hcXXXX or value Enter the help identifier or value which refers to the to be shown help screen. Remove link Remove the current link between this command and an object? O Only the link is removed. To delete the object, go to the Objects dialog box. You're in Point mode now Mouse users ----------- Select an object by clicking on it. Keyboard users -------------- Select an object with the arrow or Tab/Shift-Tab keys and press Enter. Welcome to PtGen's online tutorial PtGen's tutorials are intended to give you a quick start in operating PtGen. This part of the tutorial serves as an introduction to the most import concepts in PtGen. ( WARNING: the tutorials are not bullet-proof and can easily be distorted by not doing exactly what you are asked to do. Pressing Help (F1) will not distort the tutorial. So if you do not know what PtGen is you can press Help (F1) now to learn more about PtGen. Then proceed to read this tutorial g General guidelines for using PtGen's tutorials Constantly text will be displayed in the background to guide you through operating PtGen. The same applications as in the user's manual are created, and you will find more explanatory material there. ( There are three tutorials. They cover: S creating of statuslines creating of menubars creating of dialog boxes General PtGen ideas/usages Everything in PtGen can be considered an object or an item. You apply operations on these objects/items by first selecting them. In PtGen several keys or mouse-buttons have a special meaning. They are: Mouse users ----------- Leftbutton select object/item or popup a local menu if you click on the background Rightbutton popup menu with actions you can apply to a object or item Keyboard users -------------- Alt-F5 Pop-up local position menu for positioning the current object Alt-F10 Pop-up local menu Ctrl-F7 Delete current object/item Ctrl-F8 Edit current object/item Ctrl-F9 Link other objects to your object Ins Insert an item Del Delete an item OK, now you now enough to start with the first tutorial: creating of statuslines. Select Statusline from the Tutorial menu. Note: For every application (see the user's manual too) you have to create a separate directory and copy PREAPP.PAS to it. In the current directory are all PtGen created files saved. B To create a new application: select New from the File menu. After that you will be prompted to specify some parameters for this application. Enter as name for the application: SampleApp. Omit the preceding 'T'. PtGen will add a 'T' to every name when creating a source file Choose the English language Enable the help option and enter as name for the helpfile: sample.txt. Specify never the compiled (.HLP) version but the text file (.TXT) That's it. Select OK to close this dialog box Press Edit (Ctrl-F8) or select Edit from the menubar to start editing your application. Popup the local menu for your application by pressing Local Menu (Alt-F10) or clicking on the background with the left mouse button and holding that button down. Choose statusline from this menu. On the right side of the screen is now the statusline edit dialog box displayed. This dialog box represents the statusline. You can insert, edit or delete statusline definitions and items by pressing Ins, Ctrl-F8 and Delete respectively. Press Tab to go to the Keys for the selected status definition, press the down arrow key and press Ins or click on the New button. You can specify in this dialog box the same parameters as when calling the NewStatusKey function. f Type after Text: ~F2~ Save Type after Keycode kbF2 Type after Command cmSave Next click on OK to close the dialog box. If the ListBox is selected, you will see that the statusline has changed according to the information you specified. O Type now a F3 statusitem by pressing Ins again or clicking on the New button. P.S. if you made a mistake in the previous statusitem, move the lightbar to that item and press Edit (Ctrl-F8) or click on Edit. Type after Text ~F3~ Open Type after Keycode kbF3 Type after Command cmOpen And select the OK button. Type now the Alt-F3 statusitem by pressing Ins again or selecting the New button. Leave Text empty Type after Keycode kbAltF3 Type after Command cmClose and select the OK button to close the dialog box. If you look at the statusline you will see that the statusline has changed according to your input. Select now the OK button to close the statusitem dialog box. Exit now the application you created by pressing Exit (Alt-X). You have now finished creating your first application. But is has to be saved now in a pascal source file. PtGen is able to read that source file if you want to expand or change your application later on. You are prompted to specify a filename as this application has not yet a filename. If that file already exists, PtGen prompts you if you want to replace it. The previous file is then saved as .BAK. To save your application: B Select Save from the File menu. Specify as filename: SAMPLE1 (PtGen will add the .PAS) and select OK. This is the end of your first tutorial. You may either proceed with the second tutorial or do that a next time. Close this window by clicking on the close icon. Welcome to the second tutorial! You are going to learn how to build your own menubar. You will do this by extending the application you saved after the first tutorial. 5 Load that application by selecting Open from the File menu. Type as filename SAMPLE1 and select the OPEN button to load it Press Edit (Ctrl-F8) or select Edit from the menubar to start editting your application. Press Menu (F10) to select the menubar You selected the system menu. But if you take a look at the statusline you will see that it remains the same. But in the TP60 IDE (disappeared from BP70) a helptext appeared. You want that too? Press Edit (Ctrl-F8) to edit the system menu (no mouse equivalent). The menuitem dialog box has appeared. In this dialog box you can edit a menuitem's parameters. Except for helptext and window helptext the parameters are the same as for the NewItem function. ! Enter in the helptext inputline system commands and select OK to close this dialog box. If you now look at the statusline, you will see that the statusline has changed and now shows the desired text. / Editing a menuitem is simple. Adding one too! P Place the lightbar on the End mark ( ) symbol and press Ins to add a menuitem. You will add the File menu, just like the one in Turbo IDE. y Enter after Name ~F~ile Enter after Help text File management commands (Open, New, Save, etc.) Leave the other fields empty and select OK to close this dialogbox. The File menu has been added. Because you didn't specify a command, the File menu will contain a submenu. - Place the lightbar on File and press Enter. D An empty submenu will appear. Press Ins to insert the first menuitem of this submenu. Enter after Name ~O~pen After Command cmOpen After Keycode kbF3 After Param F3 Skip hcConstant and R enter after Help text Locate and open a file in an Edit window Select OK to close this dialogbox. Exit now the application you created by selecting Exit from the statusline or by pressing Alt-X. You have now finished creating your second application. Save this application now by selecting Save as... from the File menu. If you had choosen Save you would have overwritten the code of the first tutorial. Specify as filename: SAMPLE2 and select OK to save your application. This is the end of your second tutorial. You may either proceed with the third tutorial: creating dialogboxes or do that a next time. O **Bug in PtGen** Please exit and restart PtGen before going to third tutorial You can close this window by clicking on the close icon. Welcome to the third tutorial You are going to learn how to create dialog boxes. You will do this by extending the application you saved after the second tutorial. ) Load that application by selecting Open from the File menu. Type as filename SAMPLE2 and select the OPEN button to load it Press Edit (Ctrl-F8) or select Edit from the menubar to start editing your application. Press Menu (F10) to select the menubar Press Enter to show the About menuitem, then read on. You can "link" objects to menuitems. You will now link a dialog box object to the About menuitem. W Press Link (Ctrl-F9) to pop-up a list of objects you can link to this menuitem. There is no mouse equivalent to link objects. There are two types of objects: predefined such as a calculator and user-defined. As you will define a dialog box, a user-defined object, select Define to pop up a list of objects which can be user-defined. % From this list select Dialogbox. The dialog box settings dialog box appears in the upper right corner. You can specify a Name and a Title. You can also specify if you want a record to be created or if you want it to be centered. And full help text support of course. # Enter after Name AboutDlg Enter after Title About Press OK to close the dialog box. You can place objects, like TStaticText or TButton, in the empty dialog box. Keyboard users: Pop up a list of objects you can place in this dialog box by pressing Local Menu (Alt-F10). Mouse users: Pop up a list of objects you can place in this dialog box by placing the mouse on the dialogbox background and pressing the left mouse button. The mouse location will form the upperleft corner of the view you select. Select Static text from the pop-up. You are prompted to specify the static text. Enter the following text just as it appears. So enter for ^C first a "^" than a "C": # ^CTurbo Pascal^M^M^CVersion 7.0 and select the OK button. You will now place an OK button in this dialog box. Keyboard users: Pop up the local menu to select an object by pressing Local Menu (Alt-F10). Mouse users: Pop up the local menu by placing the mouse on the dialog box background and pressing the left mouse button. Select Button and next select OK to insert an OK button in this dialog box. Press Enter or select the OK button to close this dialog box. Press Alt-X to exit your application. You have now finished creating your third application. We will save this one under a new name. * Select Save as... from the File menu. Specify as filename: SAMPLE3 and select OK to save your application. This is the end of your third and last tutorial! Congratulations! To become a real PtGen master I advise you to study the same tutorials in the User Manual too. The User Manual will offer more explanation and mention some more advanced concepts for which in this introductionary tutorial there was no room. 2 Close this window by clicking on the close icon. File Change Dir... Change Dir brings up the Change Directory dialog box, where you can specify a directory to make current. R The current directory is the one PtGen uses to save files and to look for files. File DOS Shell With the DOS Shell command, you can leave PtGen temporarily to perform a DOS command or enter another program. D To return to PtGen, type EXIT at the DOS prompt, then press Enter.